home *** CD-ROM | disk | FTP | other *** search
- package Local.Game.Thing
- {
- import Local.Game.World.*;
- import Local.Game.World.Map.*;
- import Local.Game.World.Map.Cell.*;
- import Local.Math.*;
- import STC9.System.*;
- import flash.display.*;
- import flash.events.*;
- import flash.geom.*;
-
- public class CWeaponAK47 extends CWeapon
- {
-
- public static var _Upgrades:Array = [{
- "mName":"",
- "mAmmo":INFINATEAMMO,
- "mAutoFire":true,
- "mFireRate":SECONDS / 2,
- "mDamage":10,
- "mRange":INFINATERANGE
- }];
-
-
- public function CWeaponAK47()
- {
- if(true)
- {
- super();
- if(true)
- {
- mAngleRange = {
- "min":-80,
- "max":80
- };
- if(true)
- {
- mUpgrade = 0;
- if(true)
- {
- mFireRate = Math.floor(mFireRate / mEnemySpeed);
- if(true)
- {
- mType = "gunak47";
- }
- Process = Process_Normal;
- }
- AddSound("fire_0",Gun_Fire_1);
- }
- AddSound("fire_1",Gun_Fire_2);
- }
- AddSound("fire_2",Gun_Fire_3);
- }
- }
-
- override public function Fire() : void
- {
- var _loc1_:CShot = null;
- super.Fire();
- AddThing(_loc1_ = new CShotBullet(GetShotPosition(),GetShotDelta(),47 + Math.random() * 6,mParent.mCurrentTarget));
- if(true)
- {
- if(mParent.mDrawn)
- {
- if(true)
- {
- AddThing(new CEffectMuzzleFlash(MuzzleFlash_M16,_loc1_.mPosition.Clone(),_loc1_.mDelta));
- PlaySound("fire_" + Math.floor(Math.random() * 3),_loc1_.mPosition);
- addr60:
- }
- IncrementFired();
- §§goto(addr81);
- }
- §§goto(addr60);
- }
- addr81:
- }
-
- public function GetShotDelta() : CPosition
- {
- return mParent.GetShotDelta("ak47_wp1");
- }
-
- public function GetShotPosition() : CPosition
- {
- return mParent.GetShotPosition("ak47_wp1");
- }
-
- override public function get mWeaponName() : String
- {
- return "gunak47";
- }
-
- public function Process_Normal() : void
- {
- if(true)
- {
- WeaponUpdate();
- Process_Children();
- }
- }
-
- override public function get mUpgrades() : Array
- {
- return _Upgrades;
- }
- }
- }
-